package org.example.business.feign;

import org.example.entity.Account;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "xa-account", path = "account")
public interface AccountFeign {

    @GetMapping("/account/{id}")
    Account queryById(@PathVariable("id") Long id);

    @GetMapping("/account/reduceMoney")
    String reduceAccountMoney(@RequestParam("id") Long id, @RequestParam("money") Double money);
}
